<div class="authorizations view">
<h2><?php  echo __('Authorization');?></h2>
	<div class="actions selected">
		<?php $project_id = $this->Form->value('Project.project_id'); if(!empty($project_id)) echo $this->Html->link(__('Cancel'), array('controller'=>'projects','action' => 'view',$project_id));?>
		<?php echo $this->Html->link(__('Edit Authorization'), array('action' => 'edit', $authorization['Authorization']['id'],'p'=>$project_id)); ?> 
		<?php echo $this->Form->postLink(__('Delete Authorization'), array('action' => 'delete', $authorization['Authorization']['id'],'p'=>$project_id ), null, __('Are you sure you want to delete # %s?', $authorization['Authorization']['id'])); ?>
	</div>
	<div class="clear"></div>
	
	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($authorization['Authorization']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Description'); ?></dt>
		<dd>
			<?php echo h($authorization['Authorization']['description']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Login'); ?></dt>
		<dd>
			<?php echo h($authorization['Authorization']['login']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Password'); ?></dt>
		<dd>
			<?php echo h($authorization['Authorization']['password']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Web Url'); ?></dt>
		<dd>
			<?php echo h($authorization['Authorization']['web_url']); ?>
			&nbsp;
		</dd>
	</dl>
	<div class="clear"></div>
	
	<div class="related">
		<h3><?php echo __('Related Projects');?></h3>
		<?php if (!empty($authorization['Project'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Descriptions'); ?></th>
			<th><?php echo __('Added'); ?></th>
			<th><?php echo __('Modified'); ?></th>
			<th><?php echo __('Domain'); ?></th>
			<th><?php echo __('Pagerank'); ?></th>
			<th><?php echo __('Backlinks'); ?></th>
			<th class="actions"><?php echo $this->Html->link(__('New Project'), array('controller' => 'projects', 'action' => 'add'));?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($authorization['Project'] as $project): ?>
			<tr>
				<td><?php echo $project['id'];?></td>
				<td><?php echo $project['name'];?></td>
				<td><?php echo $project['descriptions'];?></td>
				<td><?php echo $project['added'];?></td>
				<td><?php echo $project['modified'];?></td>
				<td><?php echo $project['domain'];?></td>
				<td><?php echo $project['pagerank'];?></td>
				<td><?php echo $project['backlinks'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('View'), array('controller' => 'projects', 'action' => 'view', $project['id'])); ?>
					<?php echo $this->Html->link(__('Edit'), array('controller' => 'projects', 'action' => 'edit', $project['id'])); ?>
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'projects', 'action' => 'delete', $project['id']), null, __('Are you sure you want to delete # %s?', $project['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>

	</div>
	
	<div class="related">
		<h3><?php echo __('Related Domains');?></h3>
		<?php if (!empty($authorization['Domain'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Server Id'); ?></th>
			<th><?php echo __('Serversip Id'); ?></th>
			<th><?php echo __('Name'); ?></th>
			<th><?php echo __('Descriptions'); ?></th>
			<th><?php echo __('Keywords'); ?></th>
			<th><?php echo __('Added'); ?></th>
			<th><?php echo __('Modified'); ?></th>
			<th class="actions"><?php echo $this->Html->link(__('New Domain'), array('controller' => 'domains', 'action' => 'add'));?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($authorization['Domain'] as $domain): ?>
			<tr>
				<td><?php echo $domain['id'];?></td>
				<td><?php echo $domain['server_id'];?></td>
				<td><?php echo $domain['serversip_id'];?></td>
				<td><?php echo $domain['name'];?></td>
				<td><?php echo $domain['descriptions'];?></td>
				<td><?php echo $domain['keywords'];?></td>
				<td><?php echo $domain['added'];?></td>
				<td><?php echo $domain['modified'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('View'), array('controller' => 'domains', 'action' => 'view', $domain['id'])); ?>
					<?php echo $this->Html->link(__('Edit'), array('controller' => 'domains', 'action' => 'edit', $domain['id'])); ?>
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'domains', 'action' => 'delete', $domain['id']), null, __('Are you sure you want to delete # %s?', $domain['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>

	</div>
</div>


<div class="actions">
	<?php echo $this->element('/menu/main')?>	
	<?php echo $this->element('/menu/settings')?>	
</div>


